ARG JDK_IMAGE=harbor.runjian.com/library/openjdk8
FROM ${JDK_IMAGE}

LABEL maintainer="aaaaa@foxmail.com"
LABEL author="aaaaa"
LABEL datetime="2024年09月27日10:41:35"
LABEL descrption="微服务平台镜像"
ENV ENVIR="dev"
ENV JAVA_OPT="-Xms128m -Xmx256m"
ENV TIME_ZONE=Asia/Shanghai

RUN ln -snf /usr/share/zoneinfo/$TIME_ZONE /etc/localtime  && echo $TIME_ZONE > /etc/timezone
WORKDIR /opt
COPY target/*.jar  /opt/bin/
CMD ["/bin/sh","-c","exec java ${JAVA_OPT} -jar /opt/bin/*.jar  --spring.profiles.active=${ENVIR}"]
